<template>
    <div>
        <h1>子孙组件</h1>
    </div>
</template>

<script lang="ts">
import { defineComponent ,inject} from 'vue'

export default defineComponent({
    setup (props) {
        console.log(inject('message'))
        console.log(props.message);
        return {}
    },
    // props:['message']
    props:{
        message:{
            type:String
        }
    }
})
</script>

<style scoped>

</style>